In [1]:
%pylab inline
In [2]:
import pandas
import matplotlib.pyplot as plt
import numpy as np
import sunpy
import matplotlib
import seaborn as sns
from scipy import stats
import datetime
In [3]:
sns.set_color_palette("deep", desat=.6)
In [4]:
import heroespy
In [5]:
file2 = "/Users/schriste/Dropbox/Developer/HEROES/HEROES-Telescope/SAS2_pointing_data2.csv"
sas2 = pandas.read_csv(file2, parse_dates=True, index_col = 0)
In [6]:
file1 = "/Users/schriste/Dropbox/Developer/HEROES/HEROES-Telescope/SAS1_pointing_data2.csv"
sas1 = pandas.read_csv(file1, parse_dates=True, index_col = 0)
In [7]:
sas1.describe()
Out[7]:
In [8]:
sas2
Out[8]:
In [9]:
sas2.describe()
Out[9]:
In [10]:
sas2['ctl az'].index[0]
Out[10]:
In [11]:
from heroespy.util import times
In [12]:
times.solarobs_target2
Out[12]:
Considering only the second solar target (the AR)
In [13]:
ind = sas1['ctl el'].index
time_index=ind.indexer_between_time(times.solarobs_target2[0],times.sas_pyasr_wrongtarget[0])
sas1_obs = sas1.iloc[time_index]
In [14]:
ind = sas2['ctl el'].index
time_index=ind.indexer_between_time(times.solarobs_target2[0],times.sas_pyasr_wrongtarget[0])
sas2_obs = sas2.iloc[time_index]
Create a sub dateFrame with just the times above
In [15]:
sas2_obs.plot()
Out[15]:
In [16]:
sas1_obs.plot()
Out[16]:
Create new dataframes with just the AR observation
In [17]:
sas1_obs['ctl el'].plot()
sas2_obs['ctl el'].plot()
Out[17]:
In [18]:
sas1_obs['ctl az'].plot()
sas2_obs['ctl az'].plot()
Out[18]:
In [19]:
y1 = sas1_obs['ctl el'].resample('60s', how=np.mean) * 60 - 2.3
y2 = sas2_obs['ctl el'].resample('60s', how=np.mean) * 60
diff = y1 - y2
In [20]:
ax = diff.plot()
ax.set_ylabel('PYASF-PYASR Elevation [arcmin]')
Out[20]:
In [21]:
y1 = sas1_obs['ctl az'].resample('60s', how=np.mean) * 60 - 0.64
y2 = sas2_obs['ctl az'].resample('60s', how=np.mean) * 60
diff = y1 - y2
In [22]:
ax = diff.plot()
ax.set_ylabel('PYASF-PYASR Azimuth [arcmin]')
Out[22]:
In [29]:
y1 = sas1['ctl el'].resample('60s', how=np.mean) * 60 - 2.3
y2 = sas2['ctl el'].resample('60s', how=np.mean) * 60
diff = y1 - y2
In [31]:
ax = diff.plot()
ax.set_ylabel('PYASF-PYASR Elevation [arcmin]')
ax.set_ybound(-0.2, 0.7)
In [32]:
import Pysolar
In [40]:
sunel = [Pysolar.GetAltitude(34.4731, -104.2422, t) for t in sas1['ctl el'].resample('60s', how=np.mean).index]
In [41]:
sunel = pandas.Series(sunel, index=sas1['ctl el'].resample('60s', how=np.mean).index)
In [45]:
ax = sunel.plot()
ax.set_title("Elevation of the Sun")
ax.set_ylabel("Degrees")
Out[45]:
In [58]:
print(sunel.index[374])
sunel[374]
Out[58]:
In [27]:
col = 'ctl az'
ax = sas1[col].plot()
ax.set_title("PYAS-F")
ax = sas2[col].plot(label = 'pyas-r')
In [28]:
data['ctl el'].plot()
In [ ]:
data
In [ ]:
data['offset x'].plot()
The jump in the data is due to the fact that we reset SAS-2 to fix RAS. The reset set the solar target back to [0,0]. This was eventually corrected.
In [ ]:
data['offset y'].plot()
In [ ]:
data['pointing x'].plot()
In [ ]:
data['pointing y'].plot()
In [ ]: